# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=qt5-qtwayland
pkgver=5.9.2
pkgrel=0
arch="all"
url='http://qt-project.org/'
license="GPL-3.0 GPL-2.0 LGPL-3.0"
pkgdesc='Provides APIs for Wayland'
depends="qt5-qtdeclarative libxcomposite wayland"
depends_dev="qt5-qtbase-dev"
makedepends="$depends_dev libxkbcommon-dev"
source="http://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${pkgname/qt5-/}-opensource-src-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc"
builddir="$srcdir/${pkgname/qt5-/}-opensource-src-$pkgver"
options="!check"

build() {
	qmake-qt5
	make
}

package() {
	cd "$builddir"
	make INSTALL_ROOT="$pkgdir" install

	# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
	find "$pkgdir/usr/lib" -type f -name '*.prl' \
		-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;

	install -d "$pkgdir"/usr/share/licenses
	ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/$pkgname
}
sha512sums="28b6f77be5289cb9eba0e3e6b220d2c99d2ab4dbae8e02caecd7651b5ae33c09f117545664b01649ca52b27025cc15853806ece8dc10713c3d90832416c7def6  qtwayland-opensource-src-5.9.2.tar.xz"
